﻿using DxfMonitor.Data;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace DxfMonitor.View
{
    /// <summary>
    /// UCFiles.xaml 的交互逻辑
    /// </summary>
    public partial class UCFiles : UserControl
    {
        public UCFiles()
        {
            InitializeComponent();
        }

        private void Row_DoubleClick(object sender, MouseButtonEventArgs e)
        {
            DataGridRow row = (DataGridRow)sender;
            DxfHistoryStatus dxfHistoryStatus = row.DataContext as DxfHistoryStatus;
            Debug.WriteLine(dxfHistoryStatus.RelativePath);
            if (File.Exists(dxfHistoryStatus.FullPath))
            {
                Shared.StartFile(dxfHistoryStatus.FullPath);
            }
        }
    }
}
